package com.solo.system.api.consts;

import com.solo.common.core.base.consts.BasicCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.Accessors;

/**
 * 系统模块错误码枚举
 * 系统模块，使用 1-02-0X-00X 段
 * @author 十一
 * @since 2023/09/11 17:34
 * 人生若只如初见，何事秋风悲画扇
 **/
@Getter
@AllArgsConstructor
@Accessors(fluent = true)
public enum SystemCode implements BasicCode {

    // 01用户模块
    USER_NOT_EXISTS(1_02_01_001, "UserNotExists"),
    USER_USERNAME_EXISTS(1_02_01_002, "UserUsernameExists"),
    USER_EMAIL_EXISTS(1_02_01_003, "UserEmailExists"),
    USER_MOBILE_EXISTS(1_02_01_004, "UserMobileExists"),
    USER_NOT_LOGIN(1_02_01_005, "UserNotLogin"),
    OLD_PASSWORD_ERROR(1_02_01_006, "OldPasswordError"),
    PASSWORD_NOT_EQUALS(1_02_01_007, "PasswordNotEquals"),
    NEW_PASSWORD_EQUALS_OLD(1_02_01_008, "NewPasswordEqualsOld"),
    USER_CURRENT_NOT_DELETE(1_02_01_009, "UserCurrentNotDelete"),

    // 02角色模块
    ROLE_NOT_EXISTS(1_02_02_001, "RoleNotExists"),
    ROLE_CODE_EXISTS(1_02_02_002, "RoleCodeExists"),
    ROLE_NAME_EXISTS(1_02_02_003, "RoleNameExists"),

    // 03菜单模块

    // 04部门模块
    DEPT_NOT_EXISTS(1_02_04_001, "DeptNotExists"),
    DEPT_CODE_EXISTS(1_02_04_002, "DeptCodeExists"),
    DEPT_EXISTS_CHILDREN(1_02_04_003, "DeptExistsChildren"),
    DEPT_PARENT_DEPT_EXISTS(1_02_04_004, "DeptParentDeptExists"),
    DEPT_PARENT_DEPT_CANT_SET_OWN(1_02_04_005, "DeptParentDeptCantSetOwn"),
    DEPT_PARENT_DEPT_CANT_SET_CHILDREN(1_02_04_006, "DeptParentDeptCantSetChildren"),

    // 05岗位模块

    // 06系统配置模块
    CONFIG_NOT_EXISTS(1_02_06_001, "ConfigNotExists"),
    CONFIG_KEY_EXISTS(1_02_06_002, "ConfigKeyExists"),
    CONFIG_CANT_DELETE_SYSTEM_TYPE(1_02_06_003, "ConfigCantDeleteSystemType"),

    // 07字典管理模块
    DICT_TYPE_NOT_EXISTS(1_02_07_001, "DictTypeNotExists"),
    DICT_CODE_EXISTS(1_02_07_002, "DictCodeExists"),
    
    // 08国际化管理
    I18N_TYPE_NOT_FOUND(1_02_08_001, "I18nTypeNotFound"),
    I18N_TYPE_MUST_DEFAULT(1_02_08_002, "I18nTypeMustDefault"),
    I18N_TYPE_CANT_SETTING_DEFAULT(1_02_08_003, "I18nTypeCantSettingDefault"),
    I18N_DATA_KEY_EXISTS(1_02_08_004, "I18nDataKeyExists"),
    
    // 09通知公告
    NOTICE_NOT_FOUND(1_02_09_001, "NoticeNotFound"),
    NOTICE_STATUS_NOT_ACTIONABLE(1_02_09_002, "NoticeStatusNotActionable"),
    NOTICE_TIMEOUT_IRREVOCABLE(1_02_09_003, "NoticeTimeoutIrrevocable"),
    NOTICE_STATUS_IRREVOCABLE(1_02_09_004, "NoticeStatusIrrevocable"),
    
    ;
    
    private final Integer code;
    private final String i18nKey;

}
